<cfparam name="Workshop_ID" type="integer" default="0" />
<cfparam name="returnView" type="string" default="workshops" />
<cfparam name="mode" type="string" default="live" />

<cfif Workshop_ID gt 0>
	<script type="text/javascript" language="javascript">
	<!--
		var displayLoading = function() {
			$("#checkoutStationContainer").hide();
			$("#loadingContainer").show();
		}
		
		$(function() {
			$("#checkoutStationModal").modal();
			resizeModal("checkoutStationModal");
		})
	//-->
	</script>
	
	<cfoutput>

		<div id="checkoutStationModal" class="modal modal-fullscreen" data-backdrop="static">
			<div class="modal-header">
				<h3>Workshop Checkout Station</h3>
			</div>
			<div class="modal-body">
				<div class="container-fluid">
					<div class="row-fluid">
						<div class="span12">
							<div id="checkoutStationContainer">
								<cfinclude template="#request.pathToUI#/lists/checkoutStation.cfm">
							</div>
							<div id="loadingContainer" style="display: none;">
								<p>Loading...</p>
							</div>
						</div>
					</div>
				</div>
			</div>
			<div class="modal-footer">
				<cfif mode eq "live">
					<a href="?view=#view#&returnView=#returnView#&Workshop_ID=#Workshop_ID#&mode=practice" class="btn btn-success">Switch To Practice Mode</a>
				<cfelse>
					<a href="?view=#view#&returnView=#returnView#&Workshop_ID=#Workshop_ID#&mode=live" class="btn btn-success">Switch To Live Mode</a>
				</cfif>
				<a href="?view=#view#&returnView=#returnView#&Workshop_ID=#Workshop_ID#&mode=#mode#" class="btn btn-success" onclick="displayLoading(); return true;">Refresh</a>
				<a href="?view=#returnView#" class="btn btn-success">Close</a>
			</div>
		</div>
	
	</cfoutput>

<cfelse>

	<div class="alert alert-info notFound">Workshop not found or insufficient permissions to perform this operation</div>

</cfif>